Conventionally, a data processing technique that partially deletes data included in a data file is well known. Especially, when a data file recorded on a recording medium is to be partially deleted for respective clusters, various methods are used to effectively use a delete area.
A conventional data delete process will be described below using FIG. 2. Reference numerals 201 to 206 in FIG. 2 denote a data file which is to undergo a partial delete process. A file offset is moved to valid data immediately after a delete area to read a data file, and data is acquired on a memory (201→202). The file offset is moved to the head of the delete area to write the acquired data on the delete area (203). The read and write processes are repeated up to the end of the file (204, 205). Finally, the file size of the data file is set by excluding the area to be deleted (206). When the data file is to be partially deleted, as described above, the edit operation is implemented by repeating a plurality of read and write processes. However, with the conventional edit method, since read and write accesses to the recording medium are repeated to move data upon partially deleting a file, a high-speed edit operation cannot be provided to the user.
To solve this problem, an information edit control apparatus of Japanese Patent Laid-Open No. 2003-52006 discloses a method of reducing the number of read and write accesses to a recording medium by a method to be described below for partial data deletion.
FIG. 3 shows audio/visual (AV) data which is recorded on a recording medium and is configured for respective frames. Upon deleting a gray part of AV data 311, clusters including only frames to be partially deleted are deleted on the file system (312). For one cluster which includes both an unnecessary area as a data area to be deleted, and a valid area as a data area which is not to be deleted, dummy data is inserted in the unnecessary area (313). The aforementioned method implements partial deletion without making read and write accesses. Furthermore, when dummy data for one cluster or more is inserted in clusters that neighbor AV data (314), data of a valid area is moved (315). Finally, if a cluster including only an unnecessary area is present, it is set as an unused area on the file system to delete it (316). With the aforementioned processes in two steps, the number of read and write accesses to a recording medium is reduced, unnecessary dummy data is deleted, and a high-speed edit operation is provided to the user.
However, although the aforementioned method can reduce the number of read and write accesses, free clusters are discontinuously generated due to a change in cluster chain, and a long seek time is required for a data file that has undergone the edit operation. Also, since fragmentation occurs, a long time is required to seek a free cluster area from the recording medium.